package edu.xjdx.os.service;


import edu.xjdx.os.domain.Customer;
import org.springframework.boot.web.servlet.server.Session;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface CustomerService {
//     void add(Customer customer);

    Integer login(String customerName, String customerPassword, HttpSession session);
    
    Integer register(String customerName,String customerEmail,String customerPassword,String customerPhone,String customerAddress);
    int addCustomer(Customer customer);

    List<Customer>listAll();
     boolean remove(String id);

    boolean update(Customer customer);

    Customer findByName(String customerName);

    boolean modify(String customerEmail, String customerPhone, String customerAddress, Session session);

    Integer change(Customer customer, String oldPassword, String newPassword,String confirm);

    Integer findEmail(String customerName, String customerEmail,HttpSession session);

    Integer check(String verification, HttpSession session);

    Integer forget(String newPassword,String confirm, Customer customer);

    Customer findById(String id);
//    Customer findById(String customerId);

//    Integer update(String name, String email, String pwd, Customer user);

}
